package com.krtech.wecard.module.ramble.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.krtech.wecard.module.ramble.entity.RambleDrawLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RambleDrawLogMapper extends BaseMapper<RambleDrawLog> {

    @Select("select * from xiaoran_ramble_draw_log where phone = #{phone} ORDER BY CREATED_TIME desc LIMIT 1")
    public RambleDrawLog getLatest(String phone);

    //某日的
    @Select("select count(1) from sys_user where create_Time > #{time1} and create_Time < #{time2}")
    public int getDayCount(@Param("time1") String time1,@Param("time2") String time2);
}